<h2><?php __('Danh sách thành viên');?></h2>
<table cellpadding="0" cellspacing="0">
<tr>
		<th>STT</th>
		<th><?php echo $this->Paginator->sort('User name','username');?></th>
		<th><?php echo $this->Paginator->sort('Email','email');?></th>
		<th><?php echo $this->Paginator->sort('Tên','fullname');?></th>
		<th><?php echo $this->Paginator->sort('Thành phố','city');?></th>
		<th><?php echo $this->Paginator->sort('Địa chỉ','address');?></th>
		<th><?php echo $this->Paginator->sort('Ngày tham gia','created');?></th>
		<th><?php echo $this->Paginator->sort('Nhóm','Group.name');?></th>
		<th class="actions"><?php __('Thao tác');?></th>
</tr>
<?php
	$i = 1;
	foreach ($users as $user):
?>
<tr>
	<td><?php echo $i++; ?>
	<td><?php echo $user['User']['username']; ?>&nbsp;</td>
	<td><?php echo $user['User']['email']; ?>&nbsp;</td>
	<td><?php echo $user['User']['fullname']; ?>&nbsp;</td>
	<td><?php echo $user['City']['name']; ?>&nbsp;</td>
	<td><?php echo $user['User']['address']; ?>&nbsp;</td>
	<td><?php echo $user['User']['created']; ?>&nbsp;</td>
	<td><?php echo $user['Group']['name']; ?>&nbsp;</td>
	<td class="actions">
		<?php echo $this->Html->link($html->image('admin/icons/edit.png'), array('action' => 'edit', $user['User']['id']), array('escape' => false, 'title' => 'Sửa thông tin thành viên')); ?>
		<?php echo $this->Html->link($html->image('admin/icons/delete.png'), array('action' => 'delete', $user['User']['id']), array('escape' => false, 'title' => 'Xóa thành viên'), sprintf(__('Bạn có chắc muốn xóa thành viên [%s]?', true), $user['User']['username'])); ?>
	</td>
</tr>
<?php endforeach; ?>
</table>

<p>
<?php
	echo $this->Paginator->counter(array(
	'format' => __('Trang %page%/%pages%', true)
	));
?>	
</p>

<div class="paging">
	<?php echo $this->Paginator->prev('<< ' . __('Trở lại', true), array(), null, array('class'=>'disabled'));?>
	| 	
	<?php echo $this->Paginator->numbers();?>
	|
	<?php echo $this->Paginator->next(__('Tiếp', true) . ' >>', array(), null, array('class' => 'disabled'));?>
</div>

